/*
 * Copyright 2020-2025 the original author or authors.
 * You cannot use this file unless authorized by the author.
 */

package org.ipig.commons.conf.rocket.consumer;

import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * RocketMq消费者配置属性
 *
 * @author <a href="mailto:comchnts@163.com">chinats</a>
 * @version $$Id: RocketConsumerConf.java 3 2020-01-21 09:36:33Z ts <comchnts@163.com> $$
 * @since 1.0
 */
@Data
@ToString
public class RocketConsumerConf implements Serializable {
    // nameserver地址
    private String namesrvAddr = "";
    // instance名称
    private String instanceName = "";
    // 消费群组
    private String group = "";
    // 订阅主题
    private String subscribeTopic = "";
    // 订阅
    private String subscribeExpression = "*";
    // -------------------------如下是主动拉取消息的相关配置-----------------------------------
    // 主动消息拉取-拉消息的时间间隔
    private int pullNextDelayTimeMillis = 1;
    // 主动消息拉取-拉消息的最大数量
    private int pullMaxNums = 32 * 4;
    // 主动消息拉取-摘取的线程数量
    private int pullThreadNums = 8;
    // 其它属性
    private Map<String, Object> props = new HashMap<>();
}

